public class Fib {
    public static int fib(int x){
        int f1 = 1;
        int f2 = 1;
        int f3 = 1;
        for (int i = 3;i<=x ; i++){
            f3=f1+f2;
            f1=f2;
            f2=f3;
        }
        return f3;
    }
    public static void main(String[] args) {
        int n =10;
        int ret =fib(n);
        System.out.println(ret);

    }
}
